package com.zhangyusheng.easyecharts.component;

import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * TODO: 功能描述
 *
 * @author Michael zhang
 * @email zhangys_0217@sina.com
 * @since 2025年11月04日
 */
@Data
@Accessors(chain = true)
public class Grid implements Serializable {
    private final static long serialVersionUID = 2L;
    private String left;
    private String right;
    private String top;
    private String bottom;
    private boolean containLabel;

    public static class Builder{
        private String left;
        private String right;
        private String top;
        private String bottom;
        private boolean containLabel;
        public Builder left(String left){
            this.left = left;
            return this;
        }
        public Builder right(String right){
            this.right = right;
            return this;
        }
        public Builder top(String top){
            this.top = top;
            return this;
        }
        public Builder bottom(String bottom){
            this.bottom = bottom;
            return this;
        }
        public Builder containLabel(boolean containLabel){
            this.containLabel = containLabel;
            return this;
        }
        public Grid build(){
            return new Grid(this);
        }
    }
    private Grid(Builder builder){
        this.left = builder.left;
        this.right = builder.right;
        this.top = builder.top;
        this.bottom = builder.bottom;
        this.containLabel = builder.containLabel;
    }


}